#ifndef T1_GPIO_H_
#define T1_GPIO_H_

#include "iodef.h"

typedef struct {
        __IO uint32_t GPIO_DATA;        /* Data of Input/Output register */
        __IO uint32_t GPIO_DIR;         /* Direction of data flow register */
        __IO uint32_t Reserved;
        __IO uint32_t GPIO_EXT;         /* Port data extend register */
        __IO uint32_t GPIO_IEN;         /* Interrupt enable register */
        __IO uint32_t GPIO_ITRI;        /* Interrupt sense register */
        __IO uint32_t GPIO_IBE;         /* Interrupt both edge register */
        __IO uint32_t GPIO_IEV;         /* Interrupt event register */
        __IO uint32_t GPIO_RIS;         /* Raw interrupt status register */
        __IO uint32_t GPIO_IM;          /* Interrupt mask register */
        __IO uint32_t GPIO_MIS;         /* Masked interrupt status register */
        __IO uint32_t GPIO_IC;          /* Interrupt clear register */
        __IO uint32_t GPIO_DB;          /* Delete Bounce flag */
        __IO uint32_t GPIO_DFG;         /* Define Filter-ed Glitch */
        __IO uint32_t GPIO_TM_EN;       /* GPIO timeout mode enable */
        __IO uint32_t GPIO_TM_VAL;      /* GPIO timeout count value */
        __IO uint32_t Reserved2[48];    /* 0x100 algined */
}gpio_reg_t;

#define GPIO_MAX 116
#define GPIO_TM_ENABLE  _BIT(0)


#define GPIO    ((gpio_reg_t *)T1_GPIO_BASE)

#endif /* T1_GPIO_H_ */

